home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 4
/
Apprentice-Release4.iso
/
Source Code
/
C
/
Games
/
Pentominoes 2.0
/
Pent code
/
pent globals.h
< prev
next >
Wrap
Text File
|
1995-07-28
|
2KB
|
82 lines
#ifndef __PENT_GLOBALS_H__
#define __PENT_GLOBALS_H__
#define kBoardRowsMin 3
#define kBoardRowsMax 20
#define kBoardRowsDefault 8
#define kBoardColumnsMin 3
#define kBoardColumnsMax 20
#define kBoardColumnsDefault 8
#define kPieceSizeMin 15
#define kPieceSizeMax 50
#define kPieceSizeDefault 31
#define kBoardResType 'PBrd'
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
struct MyBoardRec
{
short numRows;
short numColumns;
Boolean locked;
Boolean unused;
Str31 title;
unsigned char boardData[kBoardRowsMax][kBoardColumnsMax];
};
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
typedef struct MyBoardRec MyBoardRec, *MyBoardPtr;
enum GameError
{
eNoError=0,
eNotAPiece,
eHighlightFirst,
ePieceNotMatch,
ePieceUsed
};
enum /* special tiles */
{
kSelectedPiece=12, /* part of a selected piece */
kNoTile, /* tile is blacked out, unplayable */
kEmptyTile, /* tile is empty, like at game startup */
kSelectedTile /* tile is selected but no piece yet */
};
typedef short GameError;
/* these are initialized at program startup */
extern short gShapes[12][5][5];
/* these are initialized at game startup */
extern short gThisGameTileSize;
/* these are initialized at game startup & need to be saved in game file */
extern short gNumHilited;
extern unsigned char gBoard[kBoardRowsMax][kBoardColumnsMax];
extern short gNumRows;
extern short gNumCols;
extern Boolean gPieceUsed[12];
extern short gNumPlayed;
extern unsigned char gPiecesPlayed[12];
extern short gSelectedPieceColor;
/* these are read from & written to prefs file */
extern short gTileSize;
extern Boolean gDisplayMessages;
extern Boolean gGraphicEffects;
extern Boolean gShowFloat;
extern Boolean gAnchorFloat;
extern Boolean gShowMessageBox;
extern Boolean gShowToolbar;
extern Boolean gAskBeforeClosing;
extern Boolean gAutoSize;
extern short gCurrentBoardIndex;
extern Str31 gCurrentGroupName;
/* these are used in board editor */
extern MyBoardRec gCurrentBoar